package main

import (
	"fmt"
	"net"
)

var conn net.Conn

func init() {
	// 和服务端建立连接
	connection, err := net.Dial("tcp", "127.0.0.1:8889")
	if err != nil {
		fmt.Println("和服务器建立连接失败", err)
		return
	}

	conn = connection
}